/**
 * 
 */
package com.nari.resconfig.service;

import java.util.List;

import com.nari.basic.model.IUser;
import com.nari.coreframe.service.IGenericService;
import com.nari.platform.model.PageCond;
import com.nari.platform.model.ResponseMsg;
import com.nari.platform.model.ResultWithPageCond;
import com.nari.resconfig.model.IProjectResourceConfig;

/**
 * 
 * @author Xiaopeng
 * @date 2014-5-9
 */
public interface IProjectResourceConfigService extends IGenericService<IProjectResourceConfig, String> {

	/**
	 * 根据用户信息删除对应的用户项目资源列表
	 * @param userUID
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-5-13
	 */
	public void deleteProjResAuthorityByUserInfo(String userUID) throws Exception;
	
	/**
	 * 根据项目信息删除对应的用户项目资源列表
	 * @param projectUID
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-5-13
	 */
	public void deleteProjResAuthorityByProjInfo(String projectUID) throws Exception;
	
	/**
	 * 查询项目资源已配置角色用户
	 * @param projectUID
	 * @param roleID
	 * @param userID
	 * @param pageCond
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-5-19
	 */
	public ResultWithPageCond<IUser> queryProjResRoleUser(String projectUID, String roleID, 
			String userID, PageCond pageCond) throws Exception;
	
	/**
	 * 查询可以配置项目资源的角色用户
	 * @param projectUID
	 * @param roleID
	 * @param userID
	 * @param pageCond
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-5-19
	 */
	public ResultWithPageCond<IUser> queryProbablyProjResRoleUser(String projectUID, 
			String roleID, String userID, PageCond pageCond) throws Exception;
	
	/**
	 * 删除用户角色的资源授权
	 * @param projectUID
	 * @param roleUID
	 * @param userUID
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-5-19
	 */
	public ResponseMsg deleteAuthorityUser(String projectUID, String roleUID, 
			String userUID) throws Exception;
	
	/**
	 * 批量设置用户角色的资源授权
	 * @param projectUID
	 * @param roleUID
	 * @param userUIDList
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-5-19
	 */
	public ResponseMsg saveAuthorityUserBatch(String projectUID, String roleUID, 
			String userUIDList) throws Exception;
	
	/**
	 * 通过角色信息查询其所属的项目资源
	 * @param projectUID
	 * @param roleUID
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-5-19
	 */
	public List<IProjectResourceConfig> queryProjResByRoleInfo(String projectUID, 
			String roleUID) throws Exception;
}
